@echo off
chcp 65001 >nul

echo Creating bin directory...
if not exist "bin" mkdir bin

echo Compiling src.main.java.java.src.main.java.src.main.com.tsf.StickyNote.java...
javac -encoding UTF-8 -d bin src.main.java.java.src.main.java.src.main.com.tsf.StickyNote.java
if %errorlevel% neq 0 (
    echo Compilation failed! Please make sure JDK is installed and environment variables are configured.
    pause
    exit /b 1
)

echo Compilation successful! Starting src.main.java.java.src.main.java.src.main.com.tsf.StickyNote application...
java -cp bin src.main.java.java.src.main.java.src.main.com.tsf.StickyNote
if %errorlevel% neq 0 (
    echo Failed to run! Please check Java environment.
    pause
    exit /b 1
)

pause
